
#ifndef DAILYREPORT_DATAPROVIDER_H
#define DAILYREPORT_DATAPROVIDER_H

#include "IwArray.h"
#include "CppSqlWrapper.h"
#include "s3eFile.h"


class DailyReportModel
{
public:
	DailyReportModel();
	DailyReportModel(int pRowId, char* pTaskName, char* pBeginDate, char* pStartTime, char* pEndTime, int pDuration);
	~DailyReportModel();

	int RowId;
	char* TaskName;
	char* BeginDate;
	char* StartTime;
	char* EndTime;
	char* Description;
	int Duration;
};

class DailyReportDataProvider
{
public:
	DailyReportDataProvider();
	~DailyReportDataProvider();

	int InsertData(DailyReportModel* pDailyReportModel);
	void UpdateDataWithoutDuration(DailyReportModel* pDailyReportModel);
	void UpdateDataDone(DailyReportModel* pDailyReportModel);
	void DeleteData(const int pRowId);
	void GetDataByRowId(DailyReportModel* pDailyReportModel, const int pRowId);
	void GetsAllRowId(CIwArray<int32>* pRowIds);
private:
	// Data member
	const char* DB_FILE_NAME;
	SqlDatabase* dbProvider;
};

#endif
